package com.fms.data.messaging.data;

import com.fms.model.messaging.domain.IEmailData;
import com.fms.model.messaging.repo.IEmailDataRepository;

public class SingletonEmailDataRepo implements IEmailDataRepository
{
	private  IEmailDataFiller	filler;
	private IEmailData	data;

	public SingletonEmailDataRepo(IEmailData _data, IEmailDataFiller _filler)
	{
		_filler.fill(_data);
		this.filler = _filler;
		this.data = _data;		
	}

	@Override
	public IEmailData load()
	{
		return data;
	}

	@Override
	public void save(IEmailData data)
	{
		filler.save(data);
		
	}
}
